<template>
  <div>
    <van-tabbar
      active-color="#f66"
      inactive-color="#666"
      :route="true"
    >
       <van-tabbar-item to="/home">
        <span>首页</span>
        <template #icon="props">
          <van-icon class-prefix="icon" class="iconfont" name="shouye"/>
        </template>
      </van-tabbar-item>
      <van-tabbar-item to="/cate">
        <span>分类</span>
        <template #icon="props">
          <van-icon class-prefix="icon" class="iconfont" name="ziyuan
"/>
        </template>
      </van-tabbar-item>
       <van-tabbar-item
        :badge="$store.state.cart.cart.items.length||''"
        to="/cart">
        <span>购物车</span>
        <template #icon="props">
          <van-icon class-prefix="icon" class="iconfont" name="icon4"/>
        </template>
      </van-tabbar-item>
       <van-tabbar-item to="/user">
        <span>我的</span>
        <template #icon="props">
          <van-icon class-prefix="icon" class="iconfont" name="user"/>
        </template>
      </van-tabbar-item>
    </van-tabbar>

  </div>
</template>

<script>
export default {
}
</script>

<style lang="scss" scoped>

</style>
